---
title: Architectural overview
sidebarTitle: Overview
---

<Info>
Self-hosted LangSmith is an add-on to the Enterprise Plan designed for our largest, most security-conscious customers. See our [pricing page](https://www.langchain.com/pricing) for more detail, and [contact our sales team](https://www.langchain.com/contact-sales) if you want to get a license key to trial LangSmith in your environment.
</Info>

You can run LangSmith in Kubernetes (recommended) or Docker in a cloud environment that you control. The LangSmith application consists of several components including LangSmith servers and stateful services:

- [LangSmith frontend](#langsmith-frontend)
- [LangSmith backend](#langsmith-backend)
- [LangSmith platform backend](#langsmith-platform-backend)
- [LangSmith Playground](#langsmith-playground)
- [LangSmith queue](#langsmith-queue)
- [LangSmith ACE (Arbitrary Code Execution) backend](#langsmith-acearbitrary-code-execution-backend)
- [ClickHouse](#clickhouse)
- [PostgreSQL](#postgresql)
- [Redis](#redis)
- [Blob storage](#blob-storage) (Optional, but recommended)

<div style={{ textAlign: 'center' }}>
<img
    className="block dark:hidden"
    src="/langsmith/images/cloud-arch-light.png"
    alt="Light mode overview"
/>

<img
    className="hidden dark:block"
    src="/langsmith/images/cloud-arch-dark.png"
    alt="Dark mode overview"
/>
</div>

To access the LangSmith UI and send API requests, you will need to expose the [LangSmith frontend](#langsmith-frontend) service. Depending on your installation method, this can be a load balancer or a port exposed on the host machine.

## Storage Services

<Note>
LangSmith Self-Hosted will bundle all storage services by default. You can configure LangSmith to use external versions of all storage services. In a production setting, we **strongly recommend using external storage services**.
</Note>

### ClickHouse

[ClickHouse](https://clickhouse.com/docs/en/intro) is a high-performance, column-oriented SQL database management system (DBMS) for online analytical processing (OLAP).

LangSmith uses ClickHouse as the primary data store for traces and feedback (high-volume data).

### PostgreSQL

[PostgreSQL](https://www.postgresql.org/about/) is a powerful, open source object-relational database system that uses and extends the SQL language combined with many features that safely store and scale the most complicated data workloads

LangSmith uses PostgreSQL as the primary data store for transactional workloads and operational data (almost everything besides traces and feedback).

### Redis

[Redis](https://github.com/redis/redis) is a powerful in-memory key-value database that persists on disk. By holding data in memory, Redis offers high performance for operations like caching.

LangSmith uses Redis to back queuing and caching operations.

### Blob storage

LangSmith supports several blob storage providers, including [AWS S3](https://aws.amazon.com/s3/), [Azure Blob Storage](https://azure.microsoft.com/en-us/services/storage/blobs/), and [Google Cloud Storage](https://cloud.google.com/storage).

LangSmith uses blob storage to store large files, such as trace artifacts, feedback attachments, and other large data objects. Blob storage is optional, but highly recommended for production deployments.

## Services

### LangSmith frontend

The frontend uses Nginx to serve the LangSmith UI and route API requests to the other servers. This serves as the entrypoint for the application and is the only component that must be exposed to users.

### LangSmith backend

The backend is the main entrypoint for CRUD API requests and handles the majority of the business logic for the application. This includes handling requests from the frontend and SDK, preparing traces for ingestion, and supporting the hub API.

### LangSmith queue

The queue handles incoming traces and feedback to ensure that they are ingested and persisted into the traces and feedback datastore asynchronously, handling checks for data integrity and ensuring successful insert into the datastore, handling retries in situations such as database errors or the temporary inability to connect to the database.

### LangSmith platform backend

The platform backend is another critical service that primarily handles authentication, run ingestion, and other high-volume tasks.

### LangSmith Playground

The playground is a service that handles forwarding requests to various LLM APIs to support the LangSmith Playground feature. This can also be used to connect to your own custom model servers.

### LangSmith ACE (Arbitrary Code Execution) backend

The ACE backend is a service that handles executing arbitrary code in a secure environment. This is used to support running custom code within LangSmith.
